import React from 'react';
import {Link} from 'react-router-dom';
import {
  AppstoreOutlined,
  AreaChartOutlined,
  BarChartOutlined,
  BarsOutlined,
  HomeOutlined,
  LineChartOutlined,
  PieChartOutlined,
  SafetyCertificateOutlined,
  ToolOutlined,
  UserOutlined,
} from '@ant-design/icons';

const items = [
  {
    title: '首页',
    label: <Link to='home'>首页</Link>,
    key: '/home',
    icon: <HomeOutlined/>
  },
  {
    title: '商品',
    label: '商品',
    key: '/goods',
    icon: <AppstoreOutlined />,
    children: [
      {
        title: '品类管理',
        label: <Link to='category'>品类管理</Link>,
        key: '/category',
        icon: <BarsOutlined/>
      },
      {
        title: '商品管理',
        label: <Link to='product'>商品管理</Link>,
        key: '/product',
        icon: <ToolOutlined/>
      },
    ]
  },
  {
    title: '用户管理',
    label: <Link to='user'>用户管理</Link>,
    key: '/user',
    icon: <UserOutlined/>
  },
  {
    title: '角色管理',
    label: <Link to='role'>角色管理</Link>,
    key: '/role',
    icon: <SafetyCertificateOutlined/>
  },
  {
    title: '图形图表',
    label: '图形图表',
    key: '/charts',
    icon: <AreaChartOutlined/>,
    children: [
      {
        title: '柱形图',
        label: <Link to='charts/line'>柱形图</Link>,
        key: '/charts/line',
        icon: <BarChartOutlined/>
      },
      {
        title: '折线图',
        label: <Link to='charts/pie'>折线图</Link>,
        key: '/charts/pie',
        icon: <LineChartOutlined/>
      },
      {
        title: '饼图',
        label: <Link to='charts/bar'>饼图</Link>,
        key: '/charts/bar',
        icon: <PieChartOutlined/>
      },
    ]
  }
];

export {
  items,
};